import request from '../request'
// 住院登记记录列表
export function PrepayinList(params) {
  return request({
    url: `/this-ii-prepayin/getThisIiPrepayinPagination`,
    method: 'post',
    data: params
  })
}
// 床位申请-假删除
export function updateRootState(params) {
  return request({
    url: `/application-bed/updateRootState`,
    method: 'post',
    data: params
  })
}

// 住院登记记录列表
export function InmaininfoList(params) {
  return request({
    url: `/this-ii-inmaininfo/getThisIiInmaininfoPagination`,
    method: 'post',
    data: params
  })
}
// 住院预约历史记录记录列表
export function historyRecode(params) {
  return request({
    url: `/this-ii-prepayin/historyRecode`,
    method: 'post',
    data: params
  })
}
// 住院处已办理列表
export function InpatienthandleList(params) {
  return request({
    url: `/this-ii-prepayin/getTheInpatientOfficeHasBeenProcessed`,
    method: 'post',
    data: params
  })
}
// 住院预约记录已住院
export function getHospitalized(params) {
  return request({
    url: `/this-ii-inmaininfo/getHospitalized`,
    method: 'post',
    data: params
  })
}
// 住院预约记录已出院
export function getLeaveHospital(params) {
  return request({
    url: `/this-ii-inmaininfo/getLeaveHospital`,
    method: 'post',
    data: params
  })
}

// 已登记查看患者详情
export function getThisIiInmaininfo(params) {
  return request({
    url: `/this-ii-inmaininfo/getThisIiInmaininfo?id=${params.id}`,
    method: 'get',
    data: params
  })
}

// 未登记查看患者详情
export function getThisIiPrepayin(params) {
  return request({
    url: `/this-ii-prepayin/getThisIiPrepayin?id=${params.id}`,
    method: 'get',
    data: params
  })
}
// 查看患者详情
export function getById(params) {
  return request({
    url: `/cwgl-prepayin/getById/${params.id}`,
    method: 'get',
    data: params
  })
}

// 未登记查看床位
export function getEemptysByPatien(params) {
  return request({
    url: `/his-cwgl-bed/getEemptysByPatien`,
    method: 'post',
    data: params
  })
}

// 查看全部床位
export function getEemptyBedsDetailsNew(params) {
  return request({
    url: '/his-cwgl-bed/getEemptyBedsDetailsNew',
    method: 'POST',
    data: params
  })
}

// 未登记查看床位
export function getReservationDetail(params) {
  return request({
    url: '/his-cwgl-bed/getReservationDetail',
    method: 'POST',
    data: params
  })
}

// 未登记查看床位 床位登记
export function addPatientBed(params) {
  return request({
    url: `/patient-bed-middle/addPatientBed?bedId=${params.bedId}&name=${params.name}&patientId=${params.patientId}`,
    method: 'post',
    data: params
  })
}
// 已登记取消登记
export function delPatientBed(params) {
  return request({
    url: `/patient-bed-middle/delPatientBed?bedId=${params.bedId}&name=${params.name}&patientId=${params.patientId}&remark=${params.remark}`,
    method: 'post',
    data: params
  })
}
// 查看详情
export function getPatientInfo(params) {
  return request({
    url: `/patient-info/getPatientInfo`,
    method: 'get',
    data: params
  })
}
// 手工录入字典表
export function getPatientBaseDict(params) {
  return request({
    url: `/patient-info/getPatientBaseDict`,
    method: 'get',
    data: params
  })
}
// 手工录入
export function insertIiPrepayin(params) {
  return request({
    url: `/this-ii-prepayin/insertIiPrepayin`,
    method: 'post',
    data: params
  })
}

// 手工录入通过门诊处方号获取信息
export function getInsertIiPrepayinInsertSource(params) {
  return request({
    url: `/this-ii-prepayin/getInsertIiPrepayinInsertSource?clinicCode=${params.clinicCode}`,
    method: 'get',
    data: params
  })
}

// 手工录入通过身份证号获取信息
export function getPatientInfoByIdCard(params) {
  return request({
    url: `/patient-info/getPatientInfoByIdenno?idenno=${params.idenno}`,
    method: 'get',
    data: params
  })
}

// 编辑手工录入
export function editIiPrepayin(params) {
  return request({
    url: `/this-ii-prepayin/editIiPrepayin`,
    method: 'post',
    data: params
  })
}

// 编辑手工录入
export function updateStatus(params) {
  return request({
    url: `/this-ii-prepayin/updateStatus?preId=${params.preId}`,
    method: 'get',
    data: params
  })
}

export function getHisCwglDeptByAreaCode(params) {
  return request({
    url: `/his-cwgl-dept/getHisCwglDeptByAreaCode?areaCode=${params.areaCode}`,
    method: 'get',
    data: params
  })
}

export function getPrintHospitalCertificate(params) {
  return request({
    url: 'this-ii-inmaininfo/getPrintHospitalCertificate',
    method: 'POST',
    data: params
  })
}

export function getAppLiCation(params) {
  return request({
    url: 'application-bed/getAppLiCation',
    method: 'POST',
    data: params
  })
}
// 获取床位申请
export function getBedReservationQuery(params) {
  return request({
    url: 'application-bed/getBedReservationQuery',
    method: 'POST',
    data: params
  })
}
// 删除-床位申请
export function deleteinformation(params) {
  return request({
    url: `application-bed/Deleteinformation?preid=${params}`,
    method: 'POST'
  })
}
// 获取已申请床位记录-床位申请
export function getNoHandleListCount(params) {
  return request({
    url: 'application-bed/getNoHandleListCount',
    method: 'get'
  })
}
// 院感消息推送
export function getSendYGMsg(params) {
  return request({
    url: 'mess-main-info/getSendYGMsg',
    method: 'post'
  })
}
// 历史床位释放
export function releaseJGBedHistory(params) {
  return request({
    url: 'this-ii-prepayin/releaseJGBedHistory',
    method: 'post',
    data: params
  })
}

// 发送通知
export function sendMessageToDoctor(params) {
  return request({
    url: '/application-bed/sendMessageToDoctor',
    method: 'post',
    data: params
  })
}

// 预绑定
export function getThisIiPrepayinPrebundled(params) {
  return request({
    url: `/patient-bed-middle-prebundled/getThisIiPrepayinPrebundled`,
    method: 'post',
    data: params
  })
}

// 专业组
export function getmedicalGroup(params) {
  return request({
    url: '/this-ii-prepayin/getmedicalGroup',
    method: 'get',
    params
  })
}

// 医疗组长
export function getmedicalGroupLeader(params) {
  return request({
    url: '/this-ii-prepayin/getmedicalGroupLeader',
    method: 'get',
    params
  })
}

// 打印
export function getQueueNum(params) {
  return request({
    url: 'this-ii-prepayin/getQueueNum',
    method: 'get',
    params
  })
}

// 床号
export function getKongBedList(params) {
  return request({
    url: 'his-cwgl-bed/getKongBedList',
    method: 'get',
    params
  })
}

export function determineSPD(params) {
  return request({
    url: 'patient-bed-middle/determineSPD',
    method: 'get',
    params
  })
}

export function getCacelReson(params) {
  return request({
    url: '/patient-bed-middle/getCacelReson',
    method: 'get',
    params
  })
}

export function getReadmissionDays(params) {
  return request({
    url: '/this-ii-prepayin/getReadmissionDays',
    method: 'get',
    params
  })
}

